Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-510

logback.xml not found when running under Ant task

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 0.9.10
    • 0.9.9
    • logback-classic
    • None
    • Ant 1.7.1

    Description

      Logback uses the thread context ClassLoader to look up logback.xml but the Ant uses a custom ClassLoader that does not have the task JAR in its classpath, as a result logback.xml is never found.

      That is, getClass().getClassLoader().getResource("logback.xml") works
      Thread.currentThread().getContextClassLoader().getResource("logback.xml") does not.

      Attachments

        Activity

          People

            logback-dev Logback dev list
            cowwoc Gili
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: